package com.study.spmongodb.rocketmq;

import java.util.Date;
import java.util.concurrent.TimeUnit;

/**
 * @author study
 * @version 1.0
 * @date 2020/10/8 9:09
 */
public class TopicDemo {
    public static void main(String[] args) {

        final Date date = new Date();
        try {
            TimeUnit.SECONDS.sleep(1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        final Date date1 = new Date();
        System.out.println(date1.after(date));
        System.out.println(date1.compareTo(date));
    }
}
